All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.realm.IdentityMap

java.lang.Object
   |
   +----java.security.Identity
           |
           +----java.security.IdentityScope
                   |
                   +----sun.server.realm.IdentityMap

public class IdentityMap
extends IdentityScope
An implementation of IdentityScope as a set of Identity files, which store the Identity name, a hashtable of key=value properties, and the Certificate associated with the Identity.

See Also:
Identity, Certificate

Constructor Index

 o IdentityMap(String)
Construct a new IdentityMap.
 o IdentityMap(String, Certificate, Hashtable, String)
Construct a new IdentityMap.

Method Index

 o addIdentity(Identity)
Store this Identity to a corresponding file, labeled by name.
 o getCertificate()
Get the certificate for this Identity.
 o getHashtable()
Get the hashtable for this Identity.
 o getIdentity(PublicKey)
Get an Identity by public key.
 o getIdentity(String)
Retrieve an Identity by name.
 o getIdentity(String, String)
Get an Identity by name and directory.
 o identities()
Return the list of Identities.
 o removeIdentity(Identity)
Remove an Identity.
 o size()
Return the number of identities stored.

Constructors

 o IdentityMap
 protected IdentityMap(String name)
Construct a new IdentityMap.

Parameters:
name - The name of the Identity.
 o IdentityMap
 public IdentityMap(String name,
                    Certificate cert,
                    Hashtable hasht,
                    String fullpath) throws IOException, KeyManagementException
Construct a new IdentityMap.

Parameters:
name - The name of the identity.
hasht - The hashtable with additional information.
path - The full path to the identity file storage directory.
Throws: IOException
Thrown if the path given is not a directory.
Throws: KeyManagementException
Thrown if the Identity can't be created.

Methods

 o identities
 public Enumeration identities()
Return the list of Identities.

Returns:
An Enumeration of Identity name strings.
Overrides:
identities in class IdentityScope
 o size
 public int size()
Return the number of identities stored.

Returns:
The number of stored identities.
Overrides:
size in class IdentityScope
 o getCertificate
 public Certificate getCertificate()
Get the certificate for this Identity.

Returns:
The certificate for this Identity, or null if none exists.
 o getHashtable
 public Hashtable getHashtable()
Get the hashtable for this Identity.

Returns:
The hashtable for this Identity.
 o addIdentity
 public void addIdentity(Identity id) throws KeyManagementException
Store this Identity to a corresponding file, labeled by name.

Throws: KeyManagementException
Thrown if the Identity already exists, or if there are storage problems.
Overrides:
addIdentity in class IdentityScope
 o getIdentity
 public Identity getIdentity(String name)
Retrieve an Identity by name.

Parameters:
name - The name of the identity you want to get.
Returns:
The Identity associated with the name given, or null if no such Identity is found.
Overrides:
getIdentity in class IdentityScope
 o getIdentity
 public static Identity getIdentity(String name,
                                    String fullpath) throws IOException
Get an Identity by name and directory.

Parameters:
name - The name of the Identity.
fullpath - The full path to the Identity.
Returns:
The Identity associated with the name given, or null if no such Identity is found.
Throws: IOException
Thrown if the path given is not a directory.
 o getIdentity
 public Identity getIdentity(PublicKey key)
Get an Identity by public key.

Parameters:
key - The key to find.
Returns:
null
Overrides:
getIdentity in class IdentityScope
 o removeIdentity
 public void removeIdentity(Identity id)
Remove an Identity.

Parameters:
id - The Identity to be removed
Overrides:
removeIdentity in class IdentityScope

All Packages  Class Hierarchy  This Package  Previous  Next  Index